import random 
times = 5 
secret = random.randint(1,100) 
print('猜一个1-100之间的数')
guess = 0 
while (guess != secret) and (times > 0):
    guess = int(input("猜猜我想的是几：")) 
    times = times - 1 
    if guess == secret: 
        print("恭喜你猜对了！") 
        break
    else:
        if guess > secret:
            print("比这个小！")
        else:
            print("比这个大！")
    if times > 0:
        print("再试一次吧：", end=" ")
    else:
        print("这句你输了！正确的数"+str(secret)+"!") 


